

/*---------------------------------------------------------
   Initializes the effect. The data is a table of data 
   which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
	
	local pos = data:GetOrigin()
	
	local emitter = ParticleEmitter( pos )
	
	for i=1,math.random(1,2) do
		
		local particle = emitter:Add( "particles/smokey", pos )

		particle:SetVelocity(Vector(math.random(-70, 70),math.random(-70, 70), math.random(-70, 70)))
		particle:SetDieTime( math.random(10,39)/10 )
		particle:SetStartAlpha( math.Rand( 25, 50 ) )
		particle:SetStartSize( math.Rand( 5, 15 ) )
		particle:SetEndSize( math.Rand( 30, 50 ) )
		particle:SetRoll( math.Rand( -95, 95 ) )
		particle:SetRollDelta( math.Rand( -0.12, 0.12 ) )
		particle:SetColor( 10,10,10 )
				
		emitter:Finish()
		
	end
	
	for i=1,math.random(1,5) do
		
		local particle = emitter:Add( "effects/yellowflare", pos )

		particle:SetVelocity(Vector(math.random(-60, 60),math.random(-60, 60), math.random(-60, 60)))
		particle:SetDieTime( math.random(3,8)/10 )
		particle:SetStartAlpha( math.Rand( 20, 95 ) )
		particle:SetStartSize( math.Rand( 5, 10 ) )
		particle:SetEndSize( math.Rand( 25, 30 ) )
		particle:SetRoll( math.Rand( -95, 95 ) )
		particle:SetRollDelta( math.Rand( -0.12, 0.12 ) )
		particle:SetColor( 225,205,160 )
				
		emitter:Finish()
		
	end
	
end


/*---------------------------------------------------------
   THINK
   Returning false makes the entity die
---------------------------------------------------------*/
function EFFECT:Think( )

	// Die instantly
	return false
	
end


/*---------------------------------------------------------
   Draw the effect
---------------------------------------------------------*/
function EFFECT:Render()

	// Do nothing - this effect is only used to spawn the particles in Init
	
end



